﻿using System.Diagnostics;
namespace Contoso.IO
{
    public partial class FileEx
    {
        public static RC OSClose(VirtualFile id)
        {
            var rc = RC.OK;
            if (id.IsOpen) { rc = id.Close(); id.IsOpen = false; }
            return rc;
        }
        public static RC OSCloseAndFree(VirtualFile id)
        {
            var rc = RC.OK;
            Debug.Assert(id != null);
            rc = OSClose(id);
            return rc;
        }
    }
}
